import wx
class Example(wx.Frame):
    def __init__(self,*args,**kw):
        super(Example,self).__init__(*args,**kw)
        self.InitUI()
    def InitUI(self):
        menuBar = wx.MenuBar()
        filemenu = wx.Menu()

        fitem = filemenu.Append(wx.ID_EXIT,"Quit","Quit Applications")
        menuBar.Append(filemenu,"&File")
        self.SetMenuBar(menuBar)

        self.Bind(wx.EVT_MENU, self.OnQuit, fitem)

        self.SetSize((400,250))
        self.SetTitle("SimpleMenu")
        #self.Centre()
        self.Center()
        self.Show()
    def OnQuit(self,e):
        self.Close()  

def main():
    ex = wx.App()
    Example(None)
    ex.MainLoop()
if __name__ == '__main__':
    main()
